package com.jet.merchant.service;

import com.jet.core.model.vo.PageVo;
import com.jet.merchant.domain.dto.PowerCreateDto;
import com.jet.merchant.domain.dto.RoleDto;
import com.jet.merchant.domain.entity.ClerkRole;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jet.merchant.domain.query.RolePageQuery;
import com.jet.merchant.domain.vo.PowerVo;
import com.jet.merchant.domain.vo.RoleVo;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author author
 * @since 2025-02-25
 */
public interface IClerkRoleService extends IService<ClerkRole> {

    void save(long merchantNo, RoleDto dto);

    void edit(long merchantNo, String id, RoleDto dto);

    void editDefaultStatus(String id);

    void editStatus(long merchantNo, String id, int status);

    void delete(long merchantNo, String id);

    PageVo<RoleVo> page(long merchantNo, RolePageQuery query);

    List<ClerkRole> list(long merchantNo);

    ClerkRole findByDefaultStatus(long merchantNo, int defaultStatus);

    void powerCreate(long merchantNo, String roleId, List<PowerCreateDto> dtos);

    void powerMenuCreate(String roleId, String resourceId);

    List<PowerVo> powerMenu(@RequestParam long merchantNo,
                            @RequestParam String accountId);

    List<String> powerMenuChecked(long merchantNo, String roleId, String accountId);
}
